<%--
  Created by IntelliJ IDEA.
  User: xianfei
  Date: 15-8-15
  Time: 上午10:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>销售管理-添加</title>
    <style>
        .area {
            width: 300px;
        }
    </style>
    <script>
        function back() {
            window.location.href = "/sell/list";
        }
        $(function () {
//            $("#gold").keyup(function () {
//                var reg = /^\d*$/;
//                var str = $("#gold").val();
//                if (!reg.test(str)) {
//                    $("#gold").after("只能输入为数字!");
//                    $("#gold").focus();
//                }
//            })
        })
    </script>
</head>
<body>
<div>
    <form:form commandName="sellManagerDTO" action="/sell/form" id="sellform">
        <form:hidden path="guid"/>
        <div>
            <form:select path="area" class="form-control area">
                <c:forEach items="${areas}" var="areas">
                    <form:option value="${areas.name}">${areas.label}</form:option>
                </c:forEach>
            </form:select>
        </div>
        <div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <label for="gold" class="col-sm-2 control-label">黄金周：</label>

                    <div class="col-sm-10">
                        <form:input path="gold" id="gold" placeholder="份数" cssClass="form-control input-lg"/>
                        <form:errors path="gold" cssClass="t16"/>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <label for="busy" class="col-sm-2 control-label">旺季周：</label>

                    <div class="col-sm-10">
                        <form:input path="busy" id="busy" placeholder="份数" cssClass="form-control input-lg"/>
                        <form:errors path="busy" cssClass="t16"/>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <label for="slack" class="col-sm-2 control-label">平季周：</label>

                    <div class="col-sm-10">
                        <form:input path="slack" id="slack" placeholder="份数" cssClass="form-control input-lg"/>
                        <form:errors path="slack" cssClass="t16"/>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <label for="common" class="col-sm-2 control-label">淡季周：</label>

                    <div class="col-sm-10">
                        <form:input path="common" id="common" placeholder="份数" cssClass="form-control input-lg"/>
                        <form:errors path="common" cssClass="t16"/>
                    </div>
                </div>
            </div>
            <input type="submit" class="btn btn-primary" value="保存"/>
            <input type="button" class="btn btn-warning" onclick="back()" value="返回"/>
        </div>

    </form:form>
</div>
</body>
</html>